package com.ailot.cloud.base.security.model;

import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * ClassName:JwtUser
 *
 * @date:2021/12/6 9:44
 * @author:litao
 */
public class JwtUser extends User {

    /**
     * 用户ID
     */
    @Getter
    private String id;
    /**
     * 机构ID
     */
    @Getter
    private String orgId;


    public JwtUser(String id, String orgId, String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.id = id;
        this.orgId = orgId;
    }
}
